package com.opm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Description TODO
 * @Date 2022/2/10 11:52 上午
 * @Created by chengang
 */
@Controller
public class CommonController {

    @RequestMapping(value="/welcome")
    public String welcome(){
        String blank = "welcome";
        return blank;
    }
    @RequestMapping(value="/{formName}")
    public String loginForm(@PathVariable String formName){
        // 作为一个空方法，可以匹配任何无效输入，再跳转到404
        return formName;
    }

    @RequestMapping(value="/")
    public String index(){
        String blank = "index";
        return blank;
    }
}
